package com.xxx.borrow.base;

import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;

public class App extends Application {

    @SuppressLint("StaticFieldLeak")
    private static Context context;
    private static App application;

    @Override
    public void onCreate() {
        super.onCreate();
        application = this;
        context = getApplicationContext();
    }

    public static Context getContext() {
        return context;
    }

    public static App getApplication() {
        if (application == null) {
            application = new App();
        }
        return application;
    }

}
